import utils from '../../packages/barcode/src/utils/mmPxExchange.js';

const mmConversionPx = function (value) {
  return utils.mmConversionPx(value);
};

const componentOptions = [
  //横线
  {
    type: 'hLine',
    width: mmConversionPx(20),
    height: 10,
  },
  //竖线
  {
    type: 'vLine',
    width: 10,
    height: mmConversionPx(20),
  },
  //文字列
  {
    type: 'words',
    width: mmConversionPx(20),
    height: mmConversionPx(7),
    value: '请填写文本',
    containerStyle: {
      fontSize: '14px',
      fontWeight: 400,
      display: 'flex',
      justifyContent: 'left',
      alignItems: 'top',
      overflow: 'hidden',
      whiteSpace: 'nowrap',
    }
  },
  //条形码
  {
    type: 'barcode',
    width: mmConversionPx(20),
    height: mmConversionPx(7),
    value: 'barcode',
    codeOptions: { displayValue: false },
    // canDelete: false,
  },
  //二维码
  {
    type: 'qrcode',
    width: mmConversionPx(10),
    height: mmConversionPx(10),
    value: 'qrcode',
    // canDelete: false,
    lockAspectRatio: true,
  },
  //图片
  {
    type: 'image',
    width: 150,
    height: 50,
    lockAspectRatio: true, //是否按比例放大缩小
    url: '', //图片地址
  },
];


export default componentOptions;